package 原型模式;

/**
 * 文 件 名 称：Worker.
 * 文 件 说 明：
 * 创   建   人：zpen.
 * 创 建 时 间：2018/5/17 11:37.
 */
public abstract class Worker implements Cloneable  {
    private String name;
    private String duty;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDuty() {
        return duty;
    }

    public void setDuty(String duty) {
        this.duty = duty;
    }

    public Worker() {

    }

    public Worker(String name, String duty) {

        this.name = name;
        this.duty = duty;
    }
    public void Show(){
        System.out.println(name+"的工作是："+duty);
    }
    @Override
    public Worker clone() throws CloneNotSupportedException {
        return (Worker) super.clone();

    }
}
